package com.relytosoft.mizar.media.analyze.api.entity.behavior;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.relytosoft.dubhe.common.core.base.BaseEntity;
import com.relytosoft.mizar.media.analyze.api.pojo.vo.AyCameraVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author lj
 */
@TableName("AY_BEHAVIOR_TASK")
@ApiModel("AyBehaviorTask")
public class AyBehaviorTask extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", required = true)
    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    /**
     * 任务名称
     */
    @ApiModelProperty(value = "任务名称")
    @TableField("NAME")
    private String name;

    /**
     * 任务类型1：实时任务，2：离线视频任务，3：离线文件任务
     */
    @ApiModelProperty(value = "任务类型1：实时任务，2：离线视频任务，3：离线文件任务")
    @TableField("TYPE")
    private Integer type;

    /**
     * 占用资源（路）
     */
    @ApiModelProperty(value = "占用资源（路）")
    @TableField("LICENCE_USING")
    private Integer licenceUsing;

    /**
     * 离线视频文件视频总时长
     */
    @ApiModelProperty(value = "离线视频文件视频总时长")
    @TableField("VIDEO_TOTAL_TIME")
    private String videoTotalTime;

    /**
     * 视频处理总时长
     */
    @ApiModelProperty(value = "视频处理总时长")
    @TableField("HANDLE_TOTAL_TIME")
    private String handleTotalTime;

    /**
     * 离线视频文件文件大小 单位：mb
     */
    @ApiModelProperty(value = "离线视频文件文件大小 单位：mb")
    @TableField("FILE_SIZE")
    private String fileSize;

    /**
     * 进程数
     */
    @ApiModelProperty(value = "进程数")
    @TableField("PROGRESS")
    private Integer progress;

    /**
     * 任务状态异常原因
     */
    @ApiModelProperty(value = "任务状态异常原因")
    @TableField("ERROR_REASON")
    private String errorReason;

    /**
     * 离线视频任务开始时间
     */
    @ApiModelProperty(value = "离线视频任务开始时间")
    @TableField("BEGIN_TIME")
    private LocalDateTime beginTime;

    /**
     * 离线视频任务结束时间
     */
    @ApiModelProperty(value = "离线视频任务结束时间")
    @TableField("END_TIME")
    private LocalDateTime endTime;

    /**
     * 录像区间开始时间
     */
    @ApiModelProperty(value = "录像区间开始时间")
    @TableField("RECORD_BEGIN_TIME")
    private LocalDateTime recordBeginTime;

    /**
     * 录像区间结束时间
     */
    @ApiModelProperty(value = "录像区间结束时间")
    @TableField("RECORD_END_TIME")
    private LocalDateTime recordEndTime;

    /**
     * 行为场景
     */
    @ApiModelProperty(value = "行为场景")
    @TableField("ALGORITHMID")
    private String algorithmid;

    /**
     * 分析事件
     */
    @ApiModelProperty(value = "分析事件")
    @TableField("SUBTYPES")
    private String subtypes;

    /**
     * 删除标记：0：否  1：是
     */
    @ApiModelProperty(value = "删除标记：0：否  1：是")
    @TableField("DELETED")
    private Integer deleted;

    /**
     * 是否启动成功过：0否，1 是
     */
    @ApiModelProperty(value = "是否启动成功过：0否，1 是")
    @TableField("IS_START_UP")
    private Integer isStartUp;

    /**
     * 防止并发状态重复启动  0 可以启动 1 正在启动
     */
    @ApiModelProperty(value = "防止并发状态重复启动  0 可以启动 1 正在启动")
    @TableField("IS_STARTING")
    private Integer isStarting;

    /**
     * 任务状态，-1：未开始，1：进行中，2：已完成  3:异常
     */
    @ApiModelProperty(value = "任务状态，-1：未开始，1：进行中，2：已完成  3:异常")
    @TableField("STATUS")
    private Integer status;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    /**
     * 0：周计划 1：日计划（周一到周日计划相同） 2：全天
     */
    @ApiModelProperty(value = "0：周计划 1：日计划（周一到周日计划相同） 2：全天")
    @TableField(exist = false)
    private Integer planType;

    /**
     * 取值范围如下： 周计划时：1～7 日计划时：1 全天：0
     */
    @ApiModelProperty(value = "取值范围如下： 周计划时：1～7 日计划时：1 全天：0")
    @TableField(exist = false)
    private Integer planInfoNum;

    /**
     * (json数据) 周计划时最多7个计划时间信息 日计划时最多1个计划时间信息 全程录时无计划时间信息
     */
    @ApiModelProperty(value = "(json数据) 周计划时最多7个计划时间信息 日计划时最多1个计划时间信息 全程录时无计划时间信息")
    @TableField(exist = false)
    private String planInfoList;

    /**
     * 设备
     */
    @ApiModelProperty(value = "设备")
    @TableField(exist = false)
    private List<AyCameraVo> ayCameraVos;

    @ApiModelProperty(value = "模板")
    @TableField(exist = false)
    private Integer planTemplateId;

    /**
     * 设备ID集合
     */
    @TableField(exist = false)
    private List<Integer> cameraIds;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getLicenceUsing() {
        return licenceUsing;
    }

    public void setLicenceUsing(Integer licenceUsing) {
        this.licenceUsing = licenceUsing;
    }

    public String getVideoTotalTime() {
        return videoTotalTime;
    }

    public void setVideoTotalTime(String videoTotalTime) {
        this.videoTotalTime = videoTotalTime;
    }

    public String getHandleTotalTime() {
        return handleTotalTime;
    }

    public void setHandleTotalTime(String handleTotalTime) {
        this.handleTotalTime = handleTotalTime;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    public Integer getProgress() {
        return progress;
    }

    public void setProgress(Integer progress) {
        this.progress = progress;
    }

    public String getErrorReason() {
        return errorReason;
    }

    public void setErrorReason(String errorReason) {
        this.errorReason = errorReason;
    }

    public LocalDateTime getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(LocalDateTime beginTime) {
        this.beginTime = beginTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    public LocalDateTime getRecordBeginTime() {
        return recordBeginTime;
    }

    public void setRecordBeginTime(LocalDateTime recordBeginTime) {
        this.recordBeginTime = recordBeginTime;
    }

    public LocalDateTime getRecordEndTime() {
        return recordEndTime;
    }

    public void setRecordEndTime(LocalDateTime recordEndTime) {
        this.recordEndTime = recordEndTime;
    }

    public String getAlgorithmid() {
        return algorithmid;
    }

    public void setAlgorithmid(String algorithmid) {
        this.algorithmid = algorithmid;
    }

    public String getSubtypes() {
        return subtypes;
    }

    public void setSubtypes(String subtypes) {
        this.subtypes = subtypes;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getIsStartUp() {
        return isStartUp;
    }

    public void setIsStartUp(Integer isStartUp) {
        this.isStartUp = isStartUp;
    }

    public Integer getIsStarting() {
        return isStarting;
    }

    public void setIsStarting(Integer isStarting) {
        this.isStarting = isStarting;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getPlanType() {
        return planType;
    }

    public void setPlanType(Integer planType) {
        this.planType = planType;
    }

    public Integer getPlanInfoNum() {
        return planInfoNum;
    }

    public void setPlanInfoNum(Integer planInfoNum) {
        this.planInfoNum = planInfoNum;
    }

    public String getPlanInfoList() {
        return planInfoList;
    }

    public void setPlanInfoList(String planInfoList) {
        this.planInfoList = planInfoList;
    }

    public List<AyCameraVo> getAyCameraVos() {
        return ayCameraVos;
    }

    public void setAyCameraVos(List<AyCameraVo> ayCameraVos) {
        this.ayCameraVos = ayCameraVos;
    }

    public Integer getPlanTemplateId() {
        return planTemplateId;
    }

    public void setPlanTemplateId(Integer planTemplateId) {
        this.planTemplateId = planTemplateId;
    }

    public List<Integer> getCameraIds() {
        return cameraIds;
    }

    public void setCameraIds(List<Integer> cameraIds) {
        this.cameraIds = cameraIds;
    }

    @Override
    public String toString() {
        return "AyBehaviorTask{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type=" + type +
                ", licenceUsing=" + licenceUsing +
                ", videoTotalTime='" + videoTotalTime + '\'' +
                ", handleTotalTime='" + handleTotalTime + '\'' +
                ", fileSize='" + fileSize + '\'' +
                ", progress=" + progress +
                ", errorReason='" + errorReason + '\'' +
                ", beginTime=" + beginTime +
                ", endTime=" + endTime +
                ", recordBeginTime=" + recordBeginTime +
                ", recordEndTime=" + recordEndTime +
                ", algorithmid='" + algorithmid + '\'' +
                ", subtypes='" + subtypes + '\'' +
                ", deleted=" + deleted +
                ", isStartUp=" + isStartUp +
                ", isStarting=" + isStarting +
                ", status=" + status +
                ", remark='" + remark + '\'' +
                ", planType=" + planType +
                ", planInfoNum=" + planInfoNum +
                ", planInfoList='" + planInfoList + '\'' +
                ", ayCameraVos=" + ayCameraVos +
                ", planTemplateId=" + planTemplateId +
                ", cameraIds=" + cameraIds +
                ", createdId=" + createdId +
                ", createdBy='" + createdBy + '\'' +
                ", createdTime=" + createdTime +
                ", updatedId=" + updatedId +
                ", updatedBy='" + updatedBy + '\'' +
                ", updatedTime=" + updatedTime +
                '}';
    }
}